package com.ymtms.arrivalofgoods.config;//
//package com.ymtms.arrivalofgoods.config;
//
//import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
//
//@EnableSwagger2
//@ComponentScan(basePackages = {"com.ymtms.arrivalofgoods.controller"})
//@Configuration
////@ConditionalOnExpression("${swagger.enable:true}")
//public class SwaggerConfig extends WebMvcConfigurationSupport {
//@Bean
//public Docket createRestApi(){
//    return  new Docket(DocumentationType.SWAGGER_2)
//            .apiInfo(apiInfo())
//            .select()
//            .apis(RequestHandlerSelectors.any())
//            .paths(PathSelectors.any())
//            .build();
//}
//
//    private ApiInfo apiInfo() {
//        return new ApiInfoBuilder()
//                .title("《SwaggerDemo的演示案例--》")//标题
//                .description("description:项目摘要")//描述
//                .termsOfServiceUrl("http://www.google.com.hk")//（不可见）条款地址，公司内部使用的话不需要配
//                .contact(new Contact("rcf", "https://blog.csdn.net/qq_36911145", "969430169@qq.com"))//作者信息
//                .version("6.6.6")//版本号
//                .build();
//    }
//    @Override
//    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/**")
//                .addResourceLocations("classpath:/static/");
//        registry.addResourceHandler("swagger-ui.html")
//                .addResourceLocations("classpath:/META-INF/resources/");
//
//       registry.addResourceHandler("/webjars/**")
//              .addResourceLocations("classpath:/META-INF/resources/webjars/");
//    }
//
//}
//
